/*
 * @Author: zhangwenqiang
 * @Date: 2021-07-25 12:39:17
 * @LastEditors: OBKoro1
 * @LastEditTime: 2021-07-26 10:24:58
 * @FilePath: /my-project/src/utils/common.js
 */

export const isEmpty = (val) => {
  if (val instanceof Array) {
    if (val.length === 0) return true
  } else if (val instanceof Object) {
    if (JSON.stringify(val) === '{}') return true
  } else {
    if (val === 'null' || isNull(val) || val === 'undefined' || isUndefined(val) || val === '') {
      return true
    }
  }
  return false
}